<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
 
<title>随便打TCS系统</title>
 
<!-- Bootstrap -->
<link href="<%=basePath%>vendors/bootstrap/dist/css/bootstrap.min.css"
    rel="stylesheet">
<!-- Font Awesome -->
<link
    href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
    rel="stylesheet">
<!-- NProgress -->
<link href="<%=basePath%>vendors/nprogress/nprogress.css"
    rel="stylesheet">
<!-- iCheck -->
<link href="<%=basePath%>vendors/iCheck/skins/flat/green.css"
    rel="stylesheet">
 
<!-- bootstrap-progressbar -->
<link
    href="<%=basePath%>vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css"
    rel="stylesheet">
<!-- JQVMap -->
<link href="<%=basePath%>vendors/jqvmap/dist/jqvmap.min.css"
    rel="stylesheet" />
<!-- bootstrap-daterangepicker -->
<link
    href="<%=basePath%>vendors/bootstrap-daterangepicker/daterangepicker.css"
    rel="stylesheet">
 
<!-- Custom Theme Style -->
<link href="<%=basePath%>build/css/custom.min.css" rel="stylesheet">
 
</head>
<body class="nav-md">
    <%@ include file="loginCheck.jsp"%>
    <div class="container body">
        <div class="main_container">
            <div class="col-md-3 left_col">
                <div class="left_col scroll-view">
                    <div class="clearfix"></div>
                    <br />
                </div>
            </div>
            <!-- page content -->
            <div class="right_col" role="main">
                <div class="">
                    <div class="clearfix"></div>
                    <div class="row">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_content">
                                    <form name="myForm" class="form-horizontal form-label-left"
                                        novalidate method="post" enctype="multipart/form-data"
                                        id="myForm">
                                        <div class="item form-group" style="display: none">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                for="name">id<span class="required"></span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="id" name="id"
                                                    class="form-control col-md-7 col-xs-12" type="text"
                                                    value="${config.id}">
                                            </div>
                                        </div>
                                        <span class="section">合伙人配置 <a style="font-size: 10px;color: red;">[配置说明：5%填写0.05]</a></span>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="cityPartnerRatio">城市合伙人比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="cityPartnerRatio" name="cityPartnerRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：5%填写0.05" value="${config.cityPartnerRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="cityPartnerRatio">超级合伙人比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="superPartnerRatio" name="superPartnerRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：5.5%填写0.055" value="${config.superPartnerRatio}">
                                            </div>
                                        </div>
                                        <span class="section">团长配置 <a style="font-size: 10px;color: red;">[配置说明：0.5%填写0.005]</a></span>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderOneRatio">一星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderOneRatio" name="tourLeaderOneRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：0.5%填写0.005" value="${config.tourLeaderOneRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderTwoRatio">二星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderTwoRatio" name="tourLeaderTwoRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：0.75%填写0.0075" value="${config.tourLeaderTwoRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderThreeRatio">三星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderThreeRatio" name="tourLeaderThreeRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1%填写0.01" value="${config.tourLeaderThreeRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderFourRatio">四星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderFourRatio" name="tourLeaderFourRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.25%填写0.0125" value="${config.tourLeaderFourRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderFiveRatio">五星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderFiveRatio" name="tourLeaderFiveRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderFiveRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderSixRatio">六星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderSixRatio" name="tourLeaderSixRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderSixRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderSevenRatio">七星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderSevenRatio" name="tourLeaderSevenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderSevenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderEightRatio">八星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderEightRatio" name="tourLeaderEightRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderEightRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderNineRatio">九星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderNineRatio" name="tourLeaderNineRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderNineRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderTenRatio">十星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderTenRatio" name="tourLeaderTenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderTenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderElevenRatio">十一星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderElevenRatio" name="tourLeaderElevenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderElevenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderTwelveRatio">十二星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderTwelveRatio" name="tourLeaderTwelveRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderTwelveRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderThirteenRatio">十三星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderThirteenRatio" name="tourLeaderThirteenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderThirteenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderFourteenRatio">十四星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderFourteenRatio" name="tourLeaderFourteenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderFourteenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderFifteenRatio">十五星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderFifteenRatio" name="tourLeaderFifteenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderFifteenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderSixteenRatio">十六星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderSixteenRatio" name="tourLeaderSixteenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderSixteenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderSeventeenRatio">十七星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderSeventeenRatio" name="tourLeaderSeventeenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderSeventeenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderEighteenRatio">十八星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderEighteenRatio" name="tourLeaderEighteenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderEighteenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderNineteenRatio">十九星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderNineteenRatio" name="tourLeaderNineteenRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderNineteenRatio}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3 col-sm-3 col-xs-12"
                                                   for="tourLeaderTwentyRatio">二十星团长比例 <span class="required">*</span>
                                            </label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="tourLeaderTwentyRatio" name="tourLeaderTwentyRatio"
                                                       class="form-control col-md-7 col-xs-12" type="text"
                                                       placeholder="例如：1.5%填写0.015" value="${config.tourLeaderTwentyRatio}">
                                            </div>
                                        </div>
 
                                        <div class="form-group">
                                            <div class="col-md-6 col-md-offset-3">
                                                <input id="revise" type="button" class="btn btn-success"
                                                    value="确定">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /page content -->
        </div>
    </div>
    <!-- /page content -->
    <!-- 上传图片并修改 -->
    <script src="<%=basePath%>vendors/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript">
        $('#revise').click(function() {
            var json = {};    //组装数据的JSON串
            json.id = $("#id").val();
            json.cityPartnerRatio = $("#cityPartnerRatio").val();
            json.superPartnerRatio = $("#superPartnerRatio").val();
            json.tourLeaderOneRatio = $("#tourLeaderOneRatio").val();
            json.tourLeaderTwoRatio = $("#tourLeaderTwoRatio").val();
            json.tourLeaderThreeRatio = $("#tourLeaderThreeRatio").val();
            json.tourLeaderFourRatio = $("#tourLeaderFourRatio").val();
            json.tourLeaderFiveRatio = $("#tourLeaderFiveRatio").val();
            json.tourLeaderSixRatio = $("#tourLeaderSixRatio").val();
            json.tourLeaderSevenRatio = $("#tourLeaderSevenRatio").val();
            json.tourLeaderEightRatio = $("#tourLeaderEightRatio").val();
            json.tourLeaderNineRatio = $("#tourLeaderNineRatio").val();
            json.tourLeaderTenRatio = $("#tourLeaderTenRatio").val();
            json.tourLeaderElevenRatio = $("#tourLeaderElevenRatio").val();
            json.tourLeaderTwelveRatio = $("#tourLeaderTwelveRatio").val();
            json.tourLeaderThirteenRatio = $("#tourLeaderThirteenRatio").val();
            json.tourLeaderFourteenRatio = $("#tourLeaderFourteenRatio").val();
            json.tourLeaderFifteenRatio = $("#tourLeaderFifteenRatio").val();
            json.tourLeaderSixteenRatio = $("#tourLeaderSixteenRatio").val();
            json.tourLeaderSeventeenRatio = $("#tourLeaderSeventeenRatio").val();
            json.tourLeaderEighteenRatio = $("#tourLeaderEighteenRatio").val();
            json.tourLeaderNineteenRatio = $("#tourLeaderNineteenRatio").val();
            json.tourLeaderTwentyRatio = $("#tourLeaderTwentyRatio").val();

            $.ajax({
                type : 'POST',
                url : 'release_config_do_update',
                data : JSON.stringify(json),
                dataType: 'json',
                contentType: 'application/json',
                success : function(date) {
                    switch (date) {
                    case -1:
                        alert("登录超时，请重新登录");
                        top.location.href = "login/${titleId}";
                        break;
                    case 1:
                        alert("修改成功");
                        location.href = "release_config_index";
                        break;
                    default:
                        alert("修改失败，请重新操作");
                        break;
                    }
                },
                error : function() {
                    alert("修改失败，请重新操作");
                }
            });                    
        });
    </script>
    <!-- Bootstrap -->
    <script src="<%=basePath%>vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="<%=basePath%>vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="<%=basePath%>vendors/nprogress/nprogress.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="<%=basePath%>vendors/moment/min/moment.min.js"></script>
    <script
        src="<%=basePath%>vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
    <!-- Chart.js -->
    <script src="<%=basePath%>vendors/Chart.js/dist/Chart.min.js"></script>
 
    <!-- Custom Theme Scripts -->
    <script src="<%=basePath%>build/js/custom.min.js"></script>
</body>
</html>